<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="description" content="嗨佑,人生就是一部小说,记录生活的点滴" />
    <meta name="keywords" content="嗨佑,记录生活,小说人说,分享你的生活动态,订阅他人的分享" />
    <link rel="stylesheet" href="../css/reset.min.css" />
    <link rel="stylesheet" href="../css/index.min.css" />
    <link rel="stylesheet" href="../util/font-awesome-3.2.1/css/font-awesome.min.css" />
    <title>记录生活的点滴</title>
</head>

<body>
    <div class="page-header clearfix">
        <h1 class="page-header-title pull-left">每个人的人生都是一部小说</h1>
        <div class="page-header-personal pull-right">
            <a href="../tpl/personal_center.html" class="personal-photo">
                <span class="name">君逸</span>
                <img src="../img/avtar.png" alt="test" />
            </a>
        </div>
    </div>
    <div class="page-aside">
        <ul class="navbar">
            <li>
                <a href="../tpl/index.html" class="home">
                    <i class="icon-home"></i>
                </a>
                <a href="../tpl/me.html">
                    <i class="icon-user"></i>
                </a>
            </li>
        </ul>
    </div>
    <div class="page-content-login">
        <div class="page-tab clearfix">
            <a href="#">登录</a>
            <a class="line">|</a>
            <a href="#">注册</a>
        </div>
        <div class="tab-main">
            <div class="login-box">
                <form>
                    <div class="form-group">
                        <img src="../img/avtar.png" alt="logo" />
                    </div>
                    <div class="form-group">
                        <span class="form-title">使用邮箱登录</span>
                    </div>
                    <div class="form-group">
                        <!--<label for="username">用户名:</label>-->
                        <input type="text" class="form-control" name="username" id="username" placeholder="用户名" />
                    </div>
                    <div class="form-group">
                        <!--<label for="password">密码:</label>-->
                        <input type="password" class="form-control" name="password" id="password" placeholder="密码" />
                    </div>
                    <div class="form-group">
                        <a href="javascript:void(0)" class="btn btn-login" id="btn-login">登录</a>
                    </div>
                </form>
            </div>
            <div class="register-box">
                <form>
                    <div class="form-group">
                        <img src="../img/avtar.png" alt="logo" />
                    </div>
                    <div class="form-group">
                        <span class="form-title">使用邮箱注册</span>
                    </div>
                    <div class="form-group">
                        <!--<label for="username">用户名:</label>-->
                        <input type="text" class="form-control" name="username" id="username" placeholder="邮箱" />
                    </div>
                    <div class="form-group">
                        <!--<label for="password">密码:</label>-->
                        <input type="password" class="form-control" name="password" id="password" placeholder="密码" />
                    </div>
                    <div class="form-group">
                        <a href="javascript:void(0)" class="btn btn-login" id="btn-register">注册</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>
<script type="text/html" id="temp-article-item">
    <%for(var i=0;i<data.length;i++) {%>
        <div class="article-item clearfix">
            <div class="intro pull-left">
                <div class="article-author">
                    <span class="author">用户</span>
                    <span class="time">发布时间</span>
                </div>
                <a href="#" class="article-title">
                    <h1><strong><%=data[i].branch%></strong><%=data[i].title%></h1>
                </a>
                <div class="article-footer">
                    <a href="#" class="read">
                        <%=data[i].read%>阅读</a>
                    <a href="#" class="comment">
                        <%=data[i].comment%>评论</a>
                    <a href="#" class="like">
                        <%=data[i].like%>喜欢</a>
                </div>
            </div>
            <div class="photo pull-right">
                <%if(data[i].photo){%>
                    <img src="<%=data[i].photo%>" alt="test" />
                    <%}%>
            </div>
        </div>
        <%}%>
</script>
<script src="../js/lib/jq.js"></script>
<script src="../js/lib/template.js"></script>
<script src="../js/page/index.js"></script>
<script type="text/javascript">
var app = {
    init: function() {
        this.render();
        this.bindEvent();
    },
    bindEvent: function() {
        //tab
        var $tab = $(".page-tab a");

        $tab.on("click", function(e) {
            if ($(this).text() == "登录") {
                $(".tab-main>div").hide();
                $(".login-box").show();
            } else if ($(this).text() == "注册") {
                 $(".tab-main>div").hide();
                $(".register-box").show();
            }

        })

    },
    render: function() {
        $(".login_box").show();
        $(".register-box").hide();
    }

}
app.init();
</script>

</html>
